Skip to content

Conversation

@rodolfo-nobrega
Copy link
Contributor

The OpenAI Python client (v1.x) automatically sends encoding_format: base64 in embedding requests. This was causing UnsupportedParamsError for Gemini embeddings because encoding_format was not in the list of supported params.

This fix adds encoding_format to the supported params list for Vertex AI embeddings. The parameter is accepted but not passed to the Gemini API since Gemini doesn't support it.

Fixes the issue where users get:
litellm.UnsupportedParamsError: gemini does not support parameters: {'encoding_format': 'base64'}

Affected models:

  • gemini/text-embedding-004
  • gemini/gemini-embedding-001
  • vertex_ai/textembedding-gecko
  • vertex_ai/text-embedding-005
  • All other Vertex AI embedding models
image

…eddings

The OpenAI Python client (v1.x) automatically sends encoding_format: base64
in embedding requests. This was causing UnsupportedParamsError for Gemini
embeddings because encoding_format was not in the list of supported params.

This fix adds encoding_format to the supported params list for Vertex AI
embeddings. The parameter is accepted but not passed to the Gemini API
since Gemini doesn't support it.

Fixes the issue where users get:
litellm.UnsupportedParamsError: gemini does not support parameters: {'encoding_format': 'base64'}

Affected models:
- gemini/text-embedding-004
- gemini/gemini-embedding-001
- vertex_ai/textembedding-gecko
- vertex_ai/text-embedding-005
- All other Vertex AI embedding models
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@rodolfo-nobrega rodolfo-nobrega deleted the fix/gemini-embedding-encoding-format branch December 1, 2025 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants